<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改退休干部信息')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-cadre-edit" th:object="${sysUserCadre}">
            <input name="userId" th:field="*{userId}" type="hidden">
            <input name="deptId"  type="hidden"  th:field="*{deptId}" id="treeId"/>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">姓名：</label>
                        <div class="col-sm-8">
                            <input name="userName" th:field="*{userName}" class="form-control" type="text" required>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <!--<div class="form-group">
                        <label class="col-sm-3 control-label">头像路径：</label>
                        <div class="col-sm-8">
                            <input name="avatar" th:field="*{avatar}" class="form-control" type="text">
                        </div>
                    </div>-->
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">出生年月：</label>
                        <div class="col-sm-8">
                            <input name="birthday" th:field="*{birthday}" class="time-input" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">籍贯：</label>
                        <div class="col-sm-8">
                            <input name="nativePlace" th:field="*{nativePlace}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">身份：</label>
                        <div class="col-sm-8">
                            <select name="identity" class="form-control m-b" th:with="type=${@dict.getType('old_identity')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue} " th:field="*{identity}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">本人联系电话：</label>
                        <div class="col-sm-8">
                            <input name="phonenumber" th:field="*{phonenumber}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">性别：</label>
                        <div class="col-sm-8">
                            <select name="sex" class="form-control m-b" th:with="type=${@dict.getType('sys_user_sex')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{sex}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">学历：</label>
                        <div class="col-sm-8">
                            <input name="education" th:field="*{education}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">民族：</label>
                        <div class="col-sm-8">
                            <input name="nation" th:field="*{nation}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">编制类型：</label>
                        <div class="col-sm-8">
                            <select name="organizationType" class="form-control m-b" th:with="type=${@dict.getType('old_organization_type')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{organizationType}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">政治面貌：</label>
                        <div class="col-sm-8">
                            <input name="politics" th:field="*{politics}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">入党时间：</label>
                        <div class="col-sm-8">
                            <input name="partyTime" th:field="*{partyTime}" class="time-input" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">工作时间：</label>
                        <div class="col-sm-8">
                            <input name="workTime" th:field="*{workTime}" class="time-input" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">退休时间：</label>
                        <div class="col-sm-8">
                            <input name="retireTime" th:field="*{retireTime}" class="time-input" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">退休时所在单位：</label>
                        <div class="col-sm-8">
                            <input name="retireCompany"th:field="*{retireCompany}"  class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">退休时职务：</label>
                        <div class="col-sm-8">
                            <input name="retireJob" th:field="*{retireJob}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">退休时职级(参公编制)：</label>
                        <div class="col-sm-8">
                            <input name="retireLevelPublic" th:field="*{retireLevelPublic}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">退休时职级(事业编制)：</label>
                        <div class="col-sm-8">
                            <input name="retireLevelCause" th:field="*{retireLevelCause}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">专业技术职务：</label>
                        <div class="col-sm-8">
                            <input name="professionalSkill" class="form-control" th:field="*{professionalSkill}" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">专业职务级别：</label>
                        <div class="col-sm-8">
                            <select name="professionalLevel" class="form-control m-b" th:with="type=${@dict.getType('old_professional_level')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{professionalLevel}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">月收入总额(元)：</label>
                        <div class="col-sm-8">
                            <input name="incomeAll" th:field="*{incomeAll}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">基本退休费：</label>
                        <div class="col-sm-8">
                            <input name="incomeRetire" th:field="*{incomeRetire}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">生活补贴：</label>
                        <div class="col-sm-8">
                            <input name="subsidyLife" th:field="*{subsidyLife}"  class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">其他补贴：</label>
                        <div class="col-sm-8">
                            <input name="subsidyOther" th:field="*{subsidyOther}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">婚姻状况：</label>
                        <div class="col-sm-8">
                            <select name="maritalStatus" class="form-control m-b" th:with="type=${@dict.getType('old_marital_status')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{maritalStatus}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">配偶姓名：</label>
                        <div class="col-sm-8">
                            <input name="spouseName" th:field="*{spouseName}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">配偶出生年月：</label>
                        <div class="col-sm-8">
                            <input name="spouseBirth" th:field="*{spouseBirth}" class="time-input" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">配偶现状：</label>
                        <div class="col-sm-8">
                            <select name="spouseStatus" class="form-control m-b" th:with="type=${@dict.getType('old_spouse_status')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{spouseStatus}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">配偶工作单位及职务：</label>
                        <div class="col-sm-8">
                            <input name="spouseWork" th:field="*{spouseWork}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">配偶联系电话：</label>
                        <div class="col-sm-8">
                            <input name="spousePhone" th:field="*{spousePhone}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女总数：</label>
                        <div class="col-sm-8">
                            <input name="childrenNum" th:field="*{childrenNum}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">无劳动能力子女：</label>
                        <div class="col-sm-8">
                            <input name="childrenNowork" th:field="*{childrenNowork}"  class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">需赡养人数：</label>
                        <div class="col-sm-8">
                            <input name="supportNum" th:field="*{supportNum}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">需抚养人数：</label>
                        <div class="col-sm-8">
                            <input name="raiseNum" th:field="*{raiseNum}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">家庭住址邮政编码：</label>
                        <div class="col-sm-8">
                            <input name="postalCode" th:field="*{postalCode}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">家庭具体住址：</label>
                        <div class="col-sm-8">
                            <input name="address" th:field="*{address}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">住宅电话：</label>
                        <div class="col-sm-8">
                            <input name="addressTelephone" th:field="*{addressTelephone}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">建筑面积：</label>
                        <div class="col-sm-8">
                            <input name="addressArea" th:field="*{addressArea}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">购房情况：</label>
                        <div class="col-sm-8">
                            <select name="housePurchase" class="form-control m-b" th:with="type=${@dict.getType('old_house_purchase')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{housePurchase}"></option>
                            </select>
                        </div>
                    </div>
                </div>
                <div class = "col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女1姓名：</label>
                        <div class="col-sm-8">
                            <input name="child1Name" th:field="*{child1Name}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女1现居住地：</label>
                        <div class="col-sm-8">
                            <input name="child1Address" th:field="*{child1Address}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女1联系电话：</label>
                        <div class="col-sm-8">
                            <input name="child1Telephone" th:field="*{child1Telephone}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女2姓名：</label>
                        <div class="col-sm-8">
                            <input name="child2Name" th:field="*{child2Name}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女2现居住地：</label>
                        <div class="col-sm-8">
                            <input name="child2Address" th:field="*{child2Address}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">子女2联系电话：</label>
                        <div class="col-sm-8">
                            <input name="child2Telephone" th:field="*{child2Telephone}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">其他联系人姓名：</label>
                        <div class="col-sm-8">
                            <input name="otherContactsName" th:field="*{otherContactsName}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">其他联系人关系：</label>
                        <div class="col-sm-8">
                            <input name="otherContactsRelationship" th:field="*{otherContactsRelationship}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">其他联系人居住地：</label>
                        <div class="col-sm-8">
                            <input name="otherContactsAddress" th:field="*{otherContactsAddress}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">其他联系人联系电话：</label>
                        <div class="col-sm-8">
                            <input name="otherContactsTelephone" th:field="*{otherContactsTelephone}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">评残情况：</label>
                        <div class="col-sm-8">
                            <input name="disabilityStas" th:field="*{disabilityStas}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">合同医院名称：</label>
                        <div class="col-sm-8">
                            <input name="assignedHospital" th:field="*{assignedHospital}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">医疗社会保险：</label>
                        <div class="col-sm-8">
                            <select name="insurance" class="form-control m-b" th:with="type=${@dict.getType('old_insurance')}">
                                <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{insurance}"></option>
                            </select>
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">就近医院名称：</label>
                        <div class="col-sm-8">
                            <input name="nearbyHospital" th:field="*{nearbyHospital}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">社会保障号码：</label>
                        <div class="col-sm-8">
                            <input name="socialSecurityNo" th:field="*{socialSecurityNo}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
            </div>

            <div class="row">
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">发挥作用情况：</label>
                        <div class="col-sm-8">
                            <input name="performance" th:field="*{performance}" class="form-control" type="text">
                        </div>
                    </div>
                </div>
                <div class="col-sm-6">
                    <div class="form-group">
                        <label class="col-sm-3 control-label is-required">归属地区：</label>
                        <div class="col-sm-8">
                            <div class="input-group">
                                <input class="form-control" type="text" name="deptName" onclick="selectDeptTree()" id="treeName" th:field="*{dept.deptName}" required>
                                <span class="input-group-addon"><i class="fa fa-search"></i></span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <h4 class="form-header h4">其他信息</h4>
            <div class="row">
                <div class="col-sm-12">
                    <div class="form-group">
                        <label class="col-xs-2 control-label">简历：</label>
                        <div class="col-xs-10">
                            <textarea name="resume" maxlength="1000" class="form-control" rows="3">[[*{resume}]]</textarea>
                        </div>
                    </div>
                </div>
            </div>
        </form>
    </div>

    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>保 存</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <script th:inline="javascript">
        var prefix = ctx + "cadre/cadre";
        $("#form-cadre-edit").validate({
            focusCleanup: true
        });

        /*用户管理-修改-选择班级树*/
        function selectDeptTree() {
            var deptId = $.common.isEmpty($("#treeId").val()) ? "100" : $("#treeId").val();
            var url = ctx + "system/dept/selectDeptTree/" + deptId;
            var options = {
                title: '选择班级',
                width: "380",
                url: url,
                callBack: doSubmit
            };
            $.modal.openOptions(options);
        }

        function doSubmit(index, layero){
            var tree = layero.find("iframe")[0].contentWindow.$._tree;
            if ($.tree.notAllowParents(tree)) {
                var body = layer.getChildFrame('body', index);
                $("#treeId").val(body.find('#treeId').val());
                $("#treeName").val(body.find('#treeName').val());
                layer.close(index);
            }
        }
        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-cadre-edit').serialize());
            }
        }

        $("input[name='loginDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>